# -*- coding:utf-8 -*-
from com.zzh.utils.dbUtils import MysqlUtils
from com.zzh.utils.table2Json_v2 import Table2Json


class ViewCityDao(object):
    def __init__(self):
        self.conn = MysqlUtils.get_mysql_connections_v2()

    def findInfo(self):
        """
        查询 view_city
        :return:
        """
        sql = "select * from view_city"
        cur = self.conn.cursor()
        rs = cur.execute(sql)
        info = None
        if rs:
            list0 = cur.fetchall()
            info = Table2Json.view_city_list_to_json(list0)
        cur.close()
        self.conn.close()
        return info

